3.554 \(\int \frac{\sec ^8(c+d x)}{(a+b \tan (c+d x))^2} \, dx\)

Optimal. Leaf size=178 \[ \frac{\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}-\frac{a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac{\left (9 a^2 b^2+5 a^4+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac{\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))}-\frac{6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}-\frac{a \tan ^4(c+d x)}{2 b^3 d}+\frac{\tan ^5(c+d x)}{5 b^2 d} \]

[Out]

(-6*a*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(b^7*d) + ((5*a^4 + 9*a^2*b^2 + 3*b^4)*Tan[c + d*x])/(b^6*d) - (a
*(2*a^2 + 3*b^2)*Tan[c + d*x]^2)/(b^5*d) + ((a^2 + b^2)*Tan[c + d*x]^3)/(b^4*d) - (a*Tan[c + d*x]^4)/(2*b^3*d)
 + Tan[c + d*x]^5/(5*b^2*d) - (a^2 + b^2)^3/(b^7*d*(a + b*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.151808, antiderivative size = 178, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}-\frac{a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac{\left (9 a^2 b^2+5 a^4+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac{\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))}-\frac{6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}-\frac{a \tan ^4(c+d x)}{2 b^3 d}+\frac{\tan ^5(c+d x)}{5 b^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^8/(a + b*Tan[c + d*x])^2,x]

[Out]

(-6*a*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(b^7*d) + ((5*a^4 + 9*a^2*b^2 + 3*b^4)*Tan[c + d*x])/(b^6*d) - (a
*(2*a^2 + 3*b^2)*Tan[c + d*x]^2)/(b^5*d) + ((a^2 + b^2)*Tan[c + d*x]^3)/(b^4*d) - (a*Tan[c + d*x]^4)/(2*b^3*d)
 + Tan[c + d*x]^5/(5*b^2*d) - (a^2 + b^2)^3/(b^7*d*(a + b*Tan[c + d*x]))

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sec ^8(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^3}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{5 a^4+9 a^2 b^2+3 b^4}{b^6}-\frac{2 a \left (2 a^2+3 b^2\right ) x}{b^6}+\frac{3 \left (a^2+b^2\right ) x^2}{b^6}-\frac{2 a x^3}{b^6}+\frac{x^4}{b^6}+\frac{\left (a^2+b^2\right )^3}{b^6 (a+x)^2}-\frac{6 a \left (a^2+b^2\right )^2}{b^6 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac{6 a \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^7 d}+\frac{\left (5 a^4+9 a^2 b^2+3 b^4\right ) \tan (c+d x)}{b^6 d}-\frac{a \left (2 a^2+3 b^2\right ) \tan ^2(c+d x)}{b^5 d}+\frac{\left (a^2+b^2\right ) \tan ^3(c+d x)}{b^4 d}-\frac{a \tan ^4(c+d x)}{2 b^3 d}+\frac{\tan ^5(c+d x)}{5 b^2 d}-\frac{\left (a^2+b^2\right )^3}{b^7 d (a+b \tan (c+d x))}\\ \end{align*}

Mathematica [A]  time = 2.41941, size = 229, normalized size = 1.29 \[ \frac{-2 \left (-2 a^2 b^4 \tan ^4(c+d x)+a b^3 \left (5 a^2+7 b^2\right ) \tan ^3(c+d x)-b^2 \left (29 a^2 b^2+15 a^4+8 b^4\right ) \tan ^2(c+d x)+2 a b \tan (c+d x) \left (15 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))-18 a^2 b^2-11 a^4-4 b^4\right )+30 a^2 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))+8 \left (a^2+b^2\right )^3\right )+b^4 \sec ^4(c+d x) \left (a^2-3 a b \tan (c+d x)+4 b^2\right )+2 b^6 \sec ^6(c+d x)}{10 b^7 d (a+b \tan (c+d x))} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^8/(a + b*Tan[c + d*x])^2,x]

[Out]

(2*b^6*Sec[c + d*x]^6 + b^4*Sec[c + d*x]^4*(a^2 + 4*b^2 - 3*a*b*Tan[c + d*x]) - 2*(8*(a^2 + b^2)^3 + 30*a^2*(a
^2 + b^2)^2*Log[a + b*Tan[c + d*x]] + 2*a*b*(-11*a^4 - 18*a^2*b^2 - 4*b^4 + 15*(a^2 + b^2)^2*Log[a + b*Tan[c +
 d*x]])*Tan[c + d*x] - b^2*(15*a^4 + 29*a^2*b^2 + 8*b^4)*Tan[c + d*x]^2 + a*b^3*(5*a^2 + 7*b^2)*Tan[c + d*x]^3
 - 2*a^2*b^4*Tan[c + d*x]^4))/(10*b^7*d*(a + b*Tan[c + d*x]))

________________________________________________________________________________________

Maple [A]  time = 0.106, size = 305, normalized size = 1.7 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{5}}{5\,{b}^{2}d}}-{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{4}}{2\,{b}^{3}d}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}{a}^{2}}{d{b}^{4}}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{{b}^{2}d}}-2\,{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}{a}^{3}}{d{b}^{5}}}-3\,{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{{b}^{3}d}}+5\,{\frac{{a}^{4}\tan \left ( dx+c \right ) }{d{b}^{6}}}+9\,{\frac{{a}^{2}\tan \left ( dx+c \right ) }{d{b}^{4}}}+3\,{\frac{\tan \left ( dx+c \right ) }{{b}^{2}d}}-{\frac{{a}^{6}}{d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-3\,{\frac{{a}^{4}}{d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-3\,{\frac{{a}^{2}}{{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) }}-{\frac{1}{bd \left ( a+b\tan \left ( dx+c \right ) \right ) }}-6\,{\frac{{a}^{5}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{b}^{7}}}-12\,{\frac{{a}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{b}^{5}}}-6\,{\frac{a\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{b}^{3}d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^8/(a+b*tan(d*x+c))^2,x)

[Out]

1/5*tan(d*x+c)^5/b^2/d-1/2*a*tan(d*x+c)^4/b^3/d+1/d/b^4*tan(d*x+c)^3*a^2+tan(d*x+c)^3/b^2/d-2/d/b^5*tan(d*x+c)
^2*a^3-3*a*tan(d*x+c)^2/b^3/d+5/d/b^6*a^4*tan(d*x+c)+9/d/b^4*a^2*tan(d*x+c)+3*tan(d*x+c)/b^2/d-1/d/b^7/(a+b*ta
n(d*x+c))*a^6-3/d/b^5/(a+b*tan(d*x+c))*a^4-3/d/b^3/(a+b*tan(d*x+c))*a^2-1/b/d/(a+b*tan(d*x+c))-6/d*a^5/b^7*ln(
a+b*tan(d*x+c))-12/d*a^3/b^5*ln(a+b*tan(d*x+c))-6*a*ln(a+b*tan(d*x+c))/b^3/d

________________________________________________________________________________________

Maxima [A]  time = 1.13519, size = 251, normalized size = 1.41 \begin{align*} -\frac{\frac{10 \,{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )}}{b^{8} \tan \left (d x + c\right ) + a b^{7}} - \frac{2 \, b^{4} \tan \left (d x + c\right )^{5} - 5 \, a b^{3} \tan \left (d x + c\right )^{4} + 10 \,{\left (a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{3} - 10 \,{\left (2 \, a^{3} b + 3 \, a b^{3}\right )} \tan \left (d x + c\right )^{2} + 10 \,{\left (5 \, a^{4} + 9 \, a^{2} b^{2} + 3 \, b^{4}\right )} \tan \left (d x + c\right )}{b^{6}} + \frac{60 \,{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{7}}}{10 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8/(a+b*tan(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/10*(10*(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)/(b^8*tan(d*x + c) + a*b^7) - (2*b^4*tan(d*x + c)^5 - 5*a*b^3*tan
(d*x + c)^4 + 10*(a^2*b^2 + b^4)*tan(d*x + c)^3 - 10*(2*a^3*b + 3*a*b^3)*tan(d*x + c)^2 + 10*(5*a^4 + 9*a^2*b^
2 + 3*b^4)*tan(d*x + c))/b^6 + 60*(a^5 + 2*a^3*b^2 + a*b^4)*log(b*tan(d*x + c) + a)/b^7)/d

________________________________________________________________________________________

Fricas [B]  time = 2.55605, size = 890, normalized size = 5. \begin{align*} -\frac{4 \,{\left (15 \, a^{4} b^{2} + 25 \, a^{2} b^{4} + 8 \, b^{6}\right )} \cos \left (d x + c\right )^{6} - 2 \, b^{6} - 2 \,{\left (15 \, a^{4} b^{2} + 25 \, a^{2} b^{4} + 8 \, b^{6}\right )} \cos \left (d x + c\right )^{4} -{\left (5 \, a^{2} b^{4} + 4 \, b^{6}\right )} \cos \left (d x + c\right )^{2} + 30 \,{\left ({\left (a^{6} + 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} +{\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 30 \,{\left ({\left (a^{6} + 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} +{\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) +{\left (3 \, a b^{5} \cos \left (d x + c\right ) - 4 \,{\left (15 \, a^{5} b + 25 \, a^{3} b^{3} + 8 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} + 2 \,{\left (5 \, a^{3} b^{3} + 7 \, a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{10 \,{\left (a b^{7} d \cos \left (d x + c\right )^{6} + b^{8} d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8/(a+b*tan(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/10*(4*(15*a^4*b^2 + 25*a^2*b^4 + 8*b^6)*cos(d*x + c)^6 - 2*b^6 - 2*(15*a^4*b^2 + 25*a^2*b^4 + 8*b^6)*cos(d*
x + c)^4 - (5*a^2*b^4 + 4*b^6)*cos(d*x + c)^2 + 30*((a^6 + 2*a^4*b^2 + a^2*b^4)*cos(d*x + c)^6 + (a^5*b + 2*a^
3*b^3 + a*b^5)*cos(d*x + c)^5*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 +
 b^2) - 30*((a^6 + 2*a^4*b^2 + a^2*b^4)*cos(d*x + c)^6 + (a^5*b + 2*a^3*b^3 + a*b^5)*cos(d*x + c)^5*sin(d*x +
c))*log(cos(d*x + c)^2) + (3*a*b^5*cos(d*x + c) - 4*(15*a^5*b + 25*a^3*b^3 + 8*a*b^5)*cos(d*x + c)^5 + 2*(5*a^
3*b^3 + 7*a*b^5)*cos(d*x + c)^3)*sin(d*x + c))/(a*b^7*d*cos(d*x + c)^6 + b^8*d*cos(d*x + c)^5*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**8/(a+b*tan(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.31501, size = 342, normalized size = 1.92 \begin{align*} -\frac{\frac{60 \,{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{7}} - \frac{10 \,{\left (6 \, a^{5} b \tan \left (d x + c\right ) + 12 \, a^{3} b^{3} \tan \left (d x + c\right ) + 6 \, a b^{5} \tan \left (d x + c\right ) + 5 \, a^{6} + 9 \, a^{4} b^{2} + 3 \, a^{2} b^{4} - b^{6}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{7}} - \frac{2 \, b^{8} \tan \left (d x + c\right )^{5} - 5 \, a b^{7} \tan \left (d x + c\right )^{4} + 10 \, a^{2} b^{6} \tan \left (d x + c\right )^{3} + 10 \, b^{8} \tan \left (d x + c\right )^{3} - 20 \, a^{3} b^{5} \tan \left (d x + c\right )^{2} - 30 \, a b^{7} \tan \left (d x + c\right )^{2} + 50 \, a^{4} b^{4} \tan \left (d x + c\right ) + 90 \, a^{2} b^{6} \tan \left (d x + c\right ) + 30 \, b^{8} \tan \left (d x + c\right )}{b^{10}}}{10 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8/(a+b*tan(d*x+c))^2,x, algorithm="giac")

[Out]

-1/10*(60*(a^5 + 2*a^3*b^2 + a*b^4)*log(abs(b*tan(d*x + c) + a))/b^7 - 10*(6*a^5*b*tan(d*x + c) + 12*a^3*b^3*t
an(d*x + c) + 6*a*b^5*tan(d*x + c) + 5*a^6 + 9*a^4*b^2 + 3*a^2*b^4 - b^6)/((b*tan(d*x + c) + a)*b^7) - (2*b^8*
tan(d*x + c)^5 - 5*a*b^7*tan(d*x + c)^4 + 10*a^2*b^6*tan(d*x + c)^3 + 10*b^8*tan(d*x + c)^3 - 20*a^3*b^5*tan(d
*x + c)^2 - 30*a*b^7*tan(d*x + c)^2 + 50*a^4*b^4*tan(d*x + c) + 90*a^2*b^6*tan(d*x + c) + 30*b^8*tan(d*x + c))
/b^10)/d